Signal Manipulation
Title: Traffic signal manipulation for Emergency vehicles
Abstract:
Traffic signals can be manipulated in a way that will allow emergency vehicles like ambulances to pass through a junction optimally. The main objective of the project is to eliminate the waiting time at a signal, to reduce delay in services and ensure traffic safety at a junction by using License Plate recognition system which detects the emergency vehicle and microcontroller which is programmed to alter the signal pattern. The project is based on the concept of image processing, data management and electronics.
Introduction:
Traffic is a huge problem in countries like India with huge population. Metropolitan cities all over the world face heavy traffic conditions regularly. With increase in number of vehicles it becomes hard for emergency vehicles to reach their destination in time. At signals or junctions, it is not always possible for an emergency vehicle to easily pass through the junction. Especially, when it comes to emergency vehicles like ambulances, firefighting vehicles, etc. where life is at stake, heavy traffic may lead to deaths and property losses. According to a government survey, 50% of heart attack cases reach hospitals late. More than 20 per cent of patients needing emergency treatment have died on their way to hospital because of delays due to traffic jams and uncooperative motorists. Health hazards due to ambulance delays are very common in world. To overcome this and provide an efficient service to the public/one in need, we can have a system which can manage the traffic at a junction by altering the signal pattern and let an emergency vehicle to pass through. The project carried out is a prototype of such system where an emergency vehicle can be detected by its license plate number and check if the vehicle needs to reach somewhere by identifying the sound of siren and change the signal accordingly. This will help us to eliminate the time for which an emergency vehicle has to stop at a signal or to provide a favorable path for it at the cross junction reducing response times and enhancing traffic safety.
Methodology
In this project, a prototype of the proposed system was built. Some sample license plate images were used which were then detected using image processing. In real life, a camera will help in detection of license plate. It requires a high end camera which can capture distant images clearly. This is why sample images were used in this project. Also the project’s goal was to reduce the transit time of an emergency vehicle by letting it pass through a junction and not to provide it a free corridor. But it can be viewed as an extended application of this system. Also only the vehicles which are in active state, i.e. the vehicles carrying a patient or headed to receive a patient, etc. will be detected and only then the signal patterns will be altered. In this project, one of the green LEDs, which has been fixed beforehand, glows as soon as the siren sound is detected, i.e. the output is given by that particular LED assuming that the vehicle is coming from its adjacent path. The program coding was done on Arduino as well as IDLE. We used Python programming language for the part of image processing and license plate detection. License plate recognition system uses the concept of optical character recognition to read the characters on a vehicle license plate. It takes the image of a vehicle as the input and outputs the characters written on its license plate. In computer science, digital image processing is the use of computer algorithms to perform image processing on digital images. As a subcategory or field of digital signal processing, digital image processing has many advantages over analogue image processing. It allows a much wider range of algorithms to be applied to the input data and can avoid problems such as the build-up of noise and signal distortion during processing. Since images are defined over two dimensions (perhaps more) digital image processing may be modelled in the form of multidimensional systems. The programming language used by us in this project for the image processing is Python. Python provides us with the ease of programming in simpler way (syntactically) with letting many options for the manipulating the image in many different ways suitable to this project. The major library used by us for the purpose of image processing is Open Computer Vision i.e. OpenCV. OpenCV is an open source module which allows various built-in functions to detect the exact portion of an image (a video frame in this case) for extraction of text of a vehicle and read it using the different machine learning algorithms. Then we use the string read from the and pass it to a function which in turn passes it to a database for verifying the validity of the number plate. Here the task is to implement License Plate Recognition (LPR) Systems using the concept of optical character recognition to read the characters on a vehicle license plate. In other words, LPR takes the image of a vehicle as the input and outputs the characters written on its license plate.
- License Plate Detection: This is the first stage. It is at this stage that the position of the license plate is determined. The input at this stage is an image of the vehicle and the output is the license plate.
- Character Segmentation: It is at this stage the characters on the license plate are mapped out and segmented into individual images.
- Character Recognition: The characters earlier segmented are identified here.
• Database Management System : In order to incorporate DBMS in the project, a sample table was created using the same database required for image processing. This table included basic columns including vehicle id, type of emergency vehicles, etc. The columns can be edited to include various entities like time stamp, scanned vehicle ids, etc. After defining a table, a procedure was created. This procedure is connected with image processing using an MySQL connector. The procedure receives an input from python. Then, it checks the input with the existing database. If there is a match, it sends a Boolean variable ‘1’ to the image processing function from where it was called. The front end of this database allows the user to append data and even delete it, if necessary. For the backend purpose, MySQL was used. These platforms are used for their functionality and ease. MySQL is an open source relational database management system.
• Simulation (Software): The project uses Arduino Genuino Uno microcontroller, a sound sensor and simple led circuit to simulate a 4-way traffic signal junction. An input from the image processing software provides valid condition of an emergency vehicle present at one of the four routes. Sound sensor is used to verify if the vehicle is active by analyzing the sound for siren noise. This activates a separate interrupt function which alters the current state of the signal for a certain period of time. The normal procedure follows a evenly delayed time loop for sequential change in the signals. The analysis of the input is checked after small instants of time.